package com.example.demo.SpringLog.controller;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/log")
@RestController
public class LogController {
    //日志框架
    private Logger logger= LoggerFactory.getLogger(LogController.class);
    @RequestMapping("/print")
    public String print(){
        System.out.println("sout打印日志");
        logger.trace("logger trace");
        logger.debug("logger debug");
        logger.info("logger info");
        logger.warn("logger warn");
        logger.error("logger error");
        return "打印日志";
    }
}
